/*
 * @Author: 张升 1562821455@qq.com
 * @Date: 2024-11-07 16:54:37
 * @LastEditors: 张升 1562821455@qq.com
 * @LastEditTime: 2024-11-07 16:57:58
 * @FilePath: \react-demo\src\views\antdTest\Antd3.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react';
import { ColorPicker, Space } from 'antd';
const DEFAULT_COLOR = [
    {
        color: 'rgb(16, 142, 233)',
        percent: 0,
    },
    {
        color: 'rgb(135, 208, 104)',
        percent: 100,
    },
];
const Demo = () => (
    <Space direction="vertical">
        <ColorPicker defaultValue="#1677ff" />
        <ColorPicker
            defaultValue={DEFAULT_COLOR}
            allowClear
            showText
            mode={['single', 'gradient']}
            onChangeComplete={(color) => {
                console.log(color.toCssString());
            }}
        />
        <ColorPicker
            defaultValue={DEFAULT_COLOR}
            allowClear
            showText
            mode="gradient"
            onChangeComplete={(color) => {
                console.log(color.toCssString());
            }}
        />
    </Space>
);
export default Demo;